TWAM: A Certifying Abstract Machine for Logic Programs

نویسندگان

  • Brandon Bohrer
  • Karl Crary
چکیده

Type-preserving (or typed) compilation uses typing derivations to certify correctness properties of compilation. We have designed and implemented a type-preserving compiler for a simply-typed dialect of Prolog we call T-Prolog. The crux of our approach is a new certifying abstract machine which we call the TypedWarren Abstract Machine (TWAM). The TWAMhas a dependent type system strong enough to specify the semantics of a logic program in the logical framework LF. We present a soundness metatheorem which constitutes a partial correctness guarantee: well-typed programs implement the logic program specified by their type. This metatheorem justifies our design and implementation of a certifying compiler from T-Prolog to TWAM.

برای دانلود رایگان متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

منابع مشابه

The Logic of Proofs as a Foundation for Certifying Mobile Computation

We explore an intuitionistic fragment of Artëmov’s Logic of Proofs as a type system for a programming language for mobile units. Such units consist of both a code and certificate component. Dubbed the Certifying Mobile Calculus, our language caters for both code and certificate development in a unified theory. In the same way that mobile code is constructed out of code components and extant typ...

متن کامل

A Program Logic for Resource Verification

We present a program logic for reasoning about resource consumption of programs written in Grail, an abstract fragment of the Java Virtual Machine Language. Serving as the target logic of a certifying compiler, the logic exploits Grail’s dual nature of combining a functional interpretation with object-oriented features and a cost model for the JVM. We present the resource-aware operational sema...

متن کامل

A WAM-based implementation for Composition of Logic Programs

The main aim of this paper is to show an abstract machine for compiling logic programs composed by means of meta-operators; in particular, we deal with union, intersection and closure, which are directly supported by the most common abstract machine for logic programming: the Warren Abstract Machine. The proposed solution is a mix of the interpretation-oriented and the compilation-oriented appr...

متن کامل

Certifying Machine Code Safety: Shallow Versus Deep Embedding

We formalise a simple assembly language with procedures and a safety policy for arithmetic overflow in Isabelle/HOL. To verify individual programs we use a safety logic. Such a logic can be realised in Isabelle/HOL either as shallow or deep embedding. In a shallow embedding logical formulas are written as HOL predicates, whereas a deep embedding models formulas as a datatype. This paper present...

متن کامل

A Compiler System of a Linear Logic Programming Language

Linear logic developed by J.-Y. Girard can be described as a logic of resources. There have been several proposals for logic programming language based on linear logic: LO, LinLog, ACL, Lolli, Lygon, and Forum. Lolli and Lygon are implemented as interpreter systems (on SML and λProlog for Lolli, on Prolog for Lygon). But, none of them have been implemented as a compiler system. This paper descr...

متن کامل

ذخیره در منابع من


  با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید

عنوان ژورنال:
  • CoRR

دوره abs/1801.00471  شماره 

صفحات  -

تاریخ انتشار 2018